<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
<html>
<head>
	<title>Iframe table rendering test</title>

	<script type="text/javascript">

window.onload = function()
{
	createIframe(  document.getElementById( 'dWithSource' ), true );
	createIframe(  document.getElementById( 'dWithout' ), false );
}

function createIframe( eTargetElement, bSetSrc )
{
	var oTargetDocument	= eTargetElement.ownerDocument ;


	// Create the editing area IFRAME.
	var oIFrame = oTargetDocument.createElement( 'iframe' ) ;

	// BUG
	// If the src of the iframe is set then the document will be rendered in quirks mode
	if ( bSetSrc )
		oIFrame.src = 'javascript:void(0)' ;


	// Append the new IFRAME to the target.
	eTargetElement.appendChild( oIFrame ) ;


	var oDoc = oIFrame.contentWindow.document ;

	oDoc.open() ;
	oDoc.write( BuildHtml() ) ;
	oDoc.close() ;

}

function BuildHtml()
{

	var sHtml = '' ;

	sHtml += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">' ;

	sHtml += '<html>' ;
	sHtml += '<head><title><\/title><meta content="text/html; charset=utf-8" http-equiv="Content-Type">' ;
	sHtml += '<\/head><body>' ;

	sHtml += '<div style="font-size:10px; font-family:Verdana">	Text outside the table';
	sHtml += '<table border="1"><tr><td>Text in the table<\/td><\/tr><\/table>';
	sHtml += 'If this is rendered in standards mode the text size inside the table will be the same as this one.';
	sHtml += '<\/div>';

	sHtml += '<\/body><\/html>' ;

	return sHtml ;
}

	</script>

</head>
<body>
	<div id="dWithSource"><p>This iframe will have the src set initially to javascript:void(0)</p></div>
	<div id="dWithout"><p>This iframe won't have anything in the src</p></div>
</body>
</html>
